{include file="public/head" /}
{include file="public/js_ueditor" /}
<!--有理想的地方，地狱都是天堂-->
<!--Copyright @ df81.com 版权所有-->
<!--作者: 南国老符 邮箱：1062129401@qq.com-->
<link href="{:config('template.skin')}/css/sku.css" rel="stylesheet" />
<link href="{:config('template.skin')}/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="{:config('template.skin')}/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css">
        <!-- 左侧菜单 开始 -->
        <div class="sidebar">
            <nav>
                <ul class="nav nav-pills nav-sidebar flex-column nav-flat nav-legacy" data-widget="treeview" role="menu" data-accordion="false">
                    {include file="public/left_content" /}
                </ul>
                <ul class="nav nav-pills nav-sidebar flex-column nav-flat nav-legacy d-block d-md-none" data-widget="treeview" role="menu" data-accordion="false">
                    {include file="public/left_data" /}
                </ul>
                <ul class="nav nav-pills nav-sidebar flex-column nav-flat nav-legacy d-block d-md-none" data-widget="treeview" role="menu" data-accordion="false">
                    {include file="public/left_global" /}
                </ul>
                <ul class="nav nav-pills nav-sidebar flex-column nav-flat nav-legacy d-block d-md-none" data-widget="treeview" role="menu" data-accordion="false">
                    {include file="public/left_system" /}
                </ul>
            </nav>
        </div>
        <!-- 左侧菜单 结束 -->
    </aside>
    <!-- 左侧 结束 -->
    <!-- 右侧 开始 -->
    <div class="content-wrapper">
        <!-- 内容导航 开始 -->
        <div class="content-header py-2 bg-white mb-3">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-sm-12">
                        <ol class="breadcrumb">
                            <li>{:lang('v_home')}<i class="fas fa-angle-right mx-2"></i></li>
                            <li>{$navModuleRs.title} {:lang('v_manage')}<i class="fas fa-angle-right mx-2"></i></li>
                            <li>{$navModuleRs.title} {:lang('v_sort')}<i class="fas fa-angle-right mx-2"></i></li>
                            <li>{empty name="rs.id"}{:lang('v_add')}{else /}{:lang('v_edit')}{/empty} {:lang('v_sort')}</li>
                        </ol>
                    </div>
                </div>
            </div>
        </div>
        <!-- 内容导航 结束 -->
        <!-- 内容主体 开始 -->
        <section class="content">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-md-12">
                        <div class="w-100 pt-3 pb-2 bg-white rounded mb-3">
                            <form name="form_keyword" action="{:url('/sort/index',['lang'=>$lang,'tabledir'=>$tabledir])}" method="post" class="row">
                                <input type="hidden" name="lang" value="{$lang}">
                                <input type="hidden" name="tabledir" value="{$tabledir}">
                                <div class="col-md-8">
                                    <a class="btn btn-default mb-2 mr-2" href="{:url('/sort/index',['lang'=>$lang,'tabledir'=>$tabledir])}"><i class="fa fa-fw fa-sitemap mr-1"></i>{:lang('v_sort')} {:lang('v_manage')}</a>
                                    <a class="btn mb-2 mr-2 btn-default" href="{:url('/sort/index',['lang'=>$lang,'signid'=>9,'tabledir'=>input('tabledir')])}"><i class="fa fa-fw fa-recycle mr-1"></i>{:lang('v_recycle')}</a>
                                    <a class="btn btn-success mb-2" href="{:url('/sort/edit',['lang'=>$lang,'tabledir'=>$tabledir])}"><i class="fa fa-fw fa-plus-circle mr-1"></i>{:lang('v_add')} {:lang('v_sort')}</a>
                                </div>
                                <div class="col-md-4">
                                    <div class="input-group">
                                        <input name="keyword" placeholder="{:lang('v_quickfind')}" type="text" class="form-control">
                                        <span class="input-group-append">
                                            <button type="submit" class="btn btn-success"><i class="fa fa-search mr-1"></i>{:lang('v_search')}</button>
                                        </span>
                                    </div>
                                </div>
                            </form>
                        </div>
                        {php}$isdisplay_array=explode(',',$navModuleRs['isdisplay']);{/php}
                        <div class="card card-outline card-success">
                            <div class="card-header">
                                <i class="fas fa-edit mr-1"></i>{empty name="rs.id"}{:lang('v_add')}{else /}{:lang('v_edit')}{/empty} {:lang('v_sort')}
                            </div>
                            <div class="card-body">
                                <form name="form_edit" id="form_edit" method="post" action="{:url('/sort/edit',['lang'=>$lang,'id'=>$rs['id'],'tabledir'=>$tabledir])}">
                                    <input type="hidden" name="id" value="{$rs.id}">
                                    <input type="hidden" name="level" value="0">
                                    <input type="hidden" name="tabledir" value="{$tabledir}">
                                    <input type="hidden" name="lang" value="{$lang}">
                                    <div class="row form-group">
                                        <div class="col-md-3 col-form-label text-right text-danger">{:lang('v_title')} *</div>
                                        <div class="col-md-5">
                                            <input type="text" class="form-control" name="title" id="title" onblur="strtopy();" value="{$rs.title}" />
                                        </div>
                                    </div>
                                    <div class="row form-group">
                                        <div class="col-md-3 col-form-label text-right">{:lang('v_short')}</div>
                                        <div class="col-md-5">
                                            <input type="text" class="form-control" name="short_title" value="{$rs.short_title}" />
                                        </div>
                                    </div>
                                    {if in_array('sortimg',$isdisplay_array)}
                                        <div class="row form-group">
                                            <div class="col-md-3 col-form-label text-right">{:lang('v_img')}</div>
                                            <div class="col-md-5">
                                                <div class="input-group">
                                                    <input value="{$rs.thumb}" name="thumb" id="morepics1" type="text" class="form-control">
                                                    <span class="input-group-append">
                                                        <span class="btn btn-success" onclick="upImage('#morepics1');"><i class="fa fa-cloud-upload-alt fa-fw mr-1"></i>{:lang('v_upload_img')}</span>
                                                    </span>
                                                </div>
                                            </div>
                                        </div>
                                    {/if}
                                    <div class="row form-group">
                                        <div class="col-md-3 col-form-label text-right">{:lang('v_seo')} {:lang('v_title')}</div>
                                        <div class="col-md-5">
                                            <input type="text" class="form-control" name="seotitle" value="{$rs.seotitle}" placeholder="{:lang('v_seo_use_title')}" />
                                        </div>
                                    </div>
                                    <div class="row form-group">
                                        <div class="col-md-3 col-form-label text-right">{:lang('v_keyword')}</div>
                                        <div class="col-md-5">
                                            <input type="text" class="form-control" name="keyword" value="{$rs.keyword}" />
                                        </div>
                                    </div>
                                    <div class="row form-group">
                                        <div class="col-md-3 text-right">{:lang('v_description')}</div>
                                        <div class="col-md-5">
                                            <textarea name="description" class="form-control" rows="4">{$rs.description}</textarea>
                                        </div>
                                    </div>
                                    {if $lang eq config('lang.default_lang') and config('global.url.bind_lang') eq 1 and config('global.url.city_site') eq 1}
                                        <div class="row form-group">
                                            <div class="col-md-3 col-form-label text-right">{:lang('v_city_site')} {:lang('v_seo')} {:lang('v_title')}</div>
                                            <div class="col-md-5">
                                                <input type="text" class="form-control" name="city_title" value="{$rs.city_title}" placeholder="{:lang('v_city_title_tips')}" />
                                                <span class="text-muted">{:lang('v_city_tips')}</span>
                                            </div>
                                        </div>
                                        <div class="row form-group">
                                            <div class="col-md-3 col-form-label text-right">{:lang('v_city_site')} {:lang('v_keyword')}</div>
                                            <div class="col-md-5">
                                                <input type="text" class="form-control" name="city_keyword" value="{$rs.city_keyword}" placeholder="{:lang('v_city_keyword_tips')}" />
                                            </div>
                                        </div>
                                        <div class="row form-group">
                                            <div class="col-md-3 text-right">{:lang('v_city_site')} {:lang('v_description')}</div>
                                            <div class="col-md-5">
                                                <textarea name="city_description" rows="4" class="form-control" placeholder="{:lang('v_city_description_tips')}">{$rs.city_description}</textarea>
                                            </div>
                                        </div>
                                    {/if}
                                    <div class="row form-group">
                                        <div class="col-md-3 col-form-label text-right">{:lang('v_parent_sort')}</div>
                                        <div class="col-md-5">
                                            {eq name="navModuleRs.sort_style" value="1"}
                                                <select name="parentid" id="parentid" class="form-control">
                                                    <option value="0">{:lang('v_top_sort')}</option>
                                                    {foreach name="sort" item="k"}
                                                        <option value="{$k.id}" {eq name="rs.parentid" value="$k.id" }selected="selected"{/eq}>{$k.html} {$k.title}</option>
                                                    {/foreach}
                                                </select>
                                                <input type="hidden" name="tree_title" id="tree_title" value="{empty name="parent_title"}{:lang('v_top_sort')}{else /}{$parent_title}{/empty}">
                                            {else /}
                                                <div class="input-group">
                                                    <input name="tree_title" id="tree_title" type="text" class="form-control" value="{empty name="parent_title"}{:lang('v_top_sort')}{else /}{$parent_title}{/empty}">
                                                    <a class="input-group-append" href="{:url('/sort/index',['lang'=>$lang,'tabledir'=>$tabledir,'from'=>'sort','parentid'=>$rs['parentid'],'sortid'=>$rs['id']])}" data-target="#modal" data-toggle="modal">
                                                        <span class="btn btn-success">{:lang('v_select')} {:lang('v_parent_sort')}</span>
                                                    </a>
                                                </div>
                                                <input type="hidden" name="parentid" id="checkid" value="{empty name="rs.parentid"}0{else /}{$rs.parentid}{/empty}">
                                            {/eq}
                                        </div>
                                    </div>
                                    <div class="row form-group">
                                        <div class="col-md-3 col-form-label text-right text-danger">{:lang('v_urlroute')} *</div>
                                        <div class="col-md-5">
                                            <input type="text" class="form-control pinyin" name="urlroute" placeholder="{:lang('v_urlroute_tips')}" value="{$rs.urlroute}" />
                                        </div>
                                    </div>
                                    <div class="row form-group d-none">
                                        <div class="col-md-3 col-form-label text-right">首字母</div>
                                        <div class="col-md-5">
                                            <input type="text" class="form-control sort_pinyin" name="initial" value="{$rs.initial}" />
                                        </div>
                                    </div>
                                    <div class="row form-group">
                                        <div class="col-md-3 col-form-label text-right">{:lang('v_sequence')}</div>
                                        <div class="col-md-5">
                                            <input type="text" class="form-control" name="sequence" value="{empty name="rs.sequence"}0{else /}{$rs.sequence}{/empty}" />
                                        </div>
                                    </div>
                                    {include file="public/js_edit_area" /}
                                    {if in_array('index_template',$isdisplay_array)}
                                    <div class="row form-group">
                                        <div class="col-md-3 col-form-label text-right">{:lang('v_index_listemplate')}</div>
                                        <div class="col-md-5">
                                            <select name="listtemp" class="form-control">
                                                {foreach $listtemp as $listtempRs}
                                                    {php}$listtempPrefix = strstr($listtempRs,'.html',true);{/php}
                                                    {if empty($rs['id']) and $listtempPrefix == $defaulttemp}
                                                        <option value="{$defaulttemp}" selected="selected">{$listtempRs}</option>
                                                    {else /}
                                                        <option value="{$listtempPrefix}" {eq name="rs.listtemp" value="$listtempPrefix" }selected="selected"{/eq}>{$listtempRs}</option>
                                                    {/if}
                                                {/foreach}
                                            </select>
                                        </div>
                                    </div>
                                    {/if}
                                    <div class="row">
                                        <div class="offset-md-3 col-md-9 mb-4">
                                            {if is_file(app()->getRootPath().'.env')}
                                                <button type="submit" class="btn btn-success mr-4"><i class="fa fa-check-circle mr-2"></i>{:lang('v_save')}</button>
                                            {else /}
                                                <button type="button" class="do_ajax btn btn-success mr-4" onclick="javascript:do_ajax('#form_edit','.do_ajax','{:url('/sort/edit',['lang'=>$lang,'id'=>$rs['id'],'tabledir'=>$tabledir])}','{:url('/sort/index',['lang'=>$lang,'tabledir'=>$tabledir])}');"><i class="fa fa-check-circle mr-2"></i>{:lang('v_save')}</button>
                                            {/if}
                                            <button type="button" class="btn btn-default" onclick="javascript:history.back(-1);"><i class="fa fa-angle-double-left mr-1"></i>{:lang('v_goback')}</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <!-- 内容主体 结束 -->
    </div>
    <!-- 右侧 结束 -->
{include file="public/foot" /}
{include file="public/js_pinyin" /}
<script type="text/plain" id="input_editor" style="display:none;"></script>
{include file="public/js_upload_img" /}
</body>
</html>